<!--
 * @FilePath     : /study_code/jquery/plugin-jquery-tmpl copy.html
 * @Description  : 渲染 object 数据
 * @Date         : 2025-04-21 14:12:29
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-21 14:12:33
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
  </head>
  <body>
    <div>
      用户信息：
      <div id="rows"></div>
    </div>

    <script id="myTemplate" type="text/x-jquery-tmpl">
      <span class="u-name">${name}</span>
      <span class="u-email">${email}</span>
    </script>

    <script src="/jquery/dist/jquery.min.js"></script>
    <script src="/jquery/plugins/jquery.tmpl/lib/jquery.tmpl.min.js"></script>

    <script>
      $(function () {
        var users = {
          name: 'fangyinggui',
          email: '18715384437@163.com',
        }
        $('#myTemplate').tmpl(users).appendTo('#rows')
      })
    </script>
  </body>
</html>
